import request from "@/utils/request";
import { Cls } from "./type";
export const getClassList = () => {
    return request.get("/class/list");
}

export const getClassListByUserId = (userId: string) => {
    return request.get("/class/list", {
        params: {
            "userId": userId
        }
    });
}

export const createClass = (cls: Cls) => {
    return request.post("/class/create", cls);
}

export const getClassInfoById = (id: string) => {
    return request.get("/class/info", {
        params: {
            "id": id
        }
    })
}